import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {RouterModule,Routes} from "@angular/router";

import { OneComponent } from './one/one.component';
import { TwoComponent } from "./two/two.component";

export const appRoutes = [
    {
        path: '',
        redirectTo: 'one',
        pathMatch: 'full'
    },
    {
        path: 'one',
        component: OneComponent
    },
    {
        path: 'two',
        component: TwoComponent
    },
    
];
@NgModule({
    declarations: [
        OneComponent,
        TwoComponent
    ],
  imports: [
        RouterModule.forRoot(appRoutes)
    ],
    exports: [
        RouterModule
    ]
})
export class AppRoutesModule { }